import Vue from 'vue'

import 'normalize.css/normalize.css'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.less'

import App from './App'
import router from './router'
import store from './store'

import '@/icons'
import '@/utils/permission'

import * as filters from './filters'

import Pagination from '@/components/Pagination'
import Table from '@/components/Table'

import permission from '@/directive/permission/index.js'
import EnumsPlugin from './plugins/enumsPlugin'
import _ from 'lodash'

Vue.use(ElementUI, {
  size: 'small'
})

Vue.component('Pagination', Pagination)
Vue.component('Table', Table)
Vue.directive('permission', permission)

Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key])
})

// 工具库
Vue.prototype._ = _

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: (h) => h(App)
}).$mount('#app')

Vue.use(EnumsPlugin)
